﻿<!DOCTYPE HTML>
<html>
<head>
    <!-- 包含公共的JSP代码片段 -->

    <title>无线点餐平台</title>


    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <script type="text/javascript" src="static/style/js/jquery.js"></script>
    <script type="text/javascript" src="static/style/js/page_common.js"></script>
    <link href="static/style/css/common_style_blue.css" rel="stylesheet" type="text/css">
    <link rel="stylesheet" type="text/css" href="static/style/css/index_1.css"/>
</head>
<body>
<!-- 页面标题 -->
<div id="TitleArea">
    <div id="TitleArea_Head"></div>
    <div id="TitleArea_Title">
        <div id="TitleArea_Title_Content">
            <img border="0" width="13" height="13"
                 src="static/style/images/title_arrow.gif"/> 餐厅订单列表
        </div>
    </div>
    <div id="TitleArea_End"></div>
</div>

<!-- 主内容区域（数据列表或表单显示） -->
<div id="MainArea">
    <table class="MainArea_Content" align="center" cellspacing="0" cellpadding="0">
        <!-- 表头-->
        <thead>
        <tr align="center" valign="middle" id="TableTitle">
            <td>订单编号</td>
            <td>餐桌名</td>
            <td>下单日期</td>
            <td>总金额</td>
            <td>状态</td>
            <td>操作</td>
        </tr>
        </thead>
        <!--显示数据列表 -->
        <tbody id="TableData">
        </tbody>
    </table>
    <!-- 其他功能超链接 -->
    <div id="TableTail" align="center">
    </div>
</div>
<script type="text/javascript">
    $(function(){
        $.ajax({
            url:"orderList",
            dataType:"json",
            success:function(data){
                $.each(data,function (i,obj) {
                    $("#TableData").append('<tr height="60">\n' +
                        '            <td>'+obj.orderNum+'</td>\n' +
                        '            <td>纽约</td>\n' +
                        '            <td>'+obj.createdDate+'</td>\n' +
                        '            <td>'+obj.amount+'</td>\n' +
                        '            <td>'+obj.status+'</td>\n' +
                        '            <td>\n' +
                        '                <a href="orderDetail.html" class="FunctionButton">详细</a>\n' +
                        '                <a href="order.html?orderNum='+obj.orderNum+'" class="FunctionButton">结账</a>\n' +
                        '            </td>' +
                        '        </tr>');
                })

            }
        })
    })
</script>
</body>
</html>
